/*********************************************************
 * copyright xinbohit.com 版权所有 
 * 开发人员：IvanYu
 * 创建时间：2014/8/24 9:36:17
 * 描述说明：
 * 
 * 更改历史：
 * 
 * *******************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LEARNREN.COM.Entity;
using LEARNREN.COM.BLL;

namespace LEARNREN.COM.UI.Template
{
    /// <summary>
    /// 栏目类型模板的积累型，默认context的state是对应的栏目
    /// </summary>
    public class CatalogueTemplate: HtmlTemplate
    {
        public int curPage = 1;
        public CatalogueTemplate(string tmpFile, long catalogueId,int page)
            : base(tmpFile)
        {
            this.context.CatalogueID = catalogueId;
            this.curPage = page;
        }

        protected override void SetContextData()
        {
            base.SetContextData();
            this.context.State = this.groupLogicFactory.CatalogueLogic.GetByIdFromCache(this.context.CatalogueID);
        }
    }
}
